Optimal. Leaf size=167 \[ -\frac{2 a^2 (A b-a B)}{b^2 d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.44311, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3604, 3630, 3539, 3537, 63, 208} \[ -\frac{2 a^2 (A b-a B)}{b^2 d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3604
Rule 3630
Rule 3539
Rule 3537
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx &=-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{-a (A b-a B)+b (A b-a B) \tan (c+d x)+\left (a^2+b^2\right ) B \tan ^2(c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{b \left (a^2+b^2\right )}\\ &=-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d}+\frac{\int \frac{-b (a A+b B)+b (A b-a B) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{b \left (a^2+b^2\right )}\\ &=-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d}-\frac{(A-i B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a-i b)}-\frac{(A+i B) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a+i b)}\\ &=-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d}+\frac{(i (A+i B)) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b) d}-\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b) d}\\ &=-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a-i b) b d}+\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a+i b) b d}\\ &=\frac{(i A+B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{3/2} d}-\frac{(i A-B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{3/2} d}-\frac{2 a^2 (A b-a B)}{b^2 \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{2 B \sqrt{a+b \tan (c+d x)}}{b^2 d}\\ \end{align*}
Mathematica [C] time = 1.27118, size = 248, normalized size = 1.49 \[ \frac{\frac{(A b-a B) \left ((b-i a) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a-i b}\right )+(b+i a) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a+i b}\right )\right )}{\left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}+\frac{4 a B-2 A b}{b \sqrt{a+b \tan (c+d x)}}+\frac{2 B \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}}+i B \left (\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{\sqrt{a-i b}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{\sqrt{a+i b}}\right )}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.115, size = 7982, normalized size = 47.8 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (A + B \tan{\left (c + d x \right )}\right ) \tan ^{2}{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]